﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Text;
namespace Vmago.Controllers
{
    public class ControllerBase : Controller
    {
        public void RenderJSON(object obj)
        {
            string jsonString = Newtonsoft.Json.JavaScriptConvert.SerializeObject(obj);
            Response.Clear();
            Response.ContentEncoding = Encoding.UTF8;
            Response.ContentType = "application/json";
            Response.Write(jsonString);
            Response.Flush();
            Response.End();
        }

    }
}
